
/**
 * Created by IntelliJ IDEA.
 * User: jiming
 * Date: 11-3-29
 * Time: 上午10:32
 * To change this template use File | Settings | File Templates.
 */

import java.util.regex.Matcher
import java.util.regex.Pattern
import com.google.common.collect.Maps

// remove throws multiple exceptions
def thestr = '''
	public List<ContentProvider> getAllContentProvider() {
		return CdnMockHelper.contentProviderList;
	}

	boolean deleteContentProvider(String id) {
		Iterator<ContentProvider> iterator = getAllContentProvider().iterator();
		while(iterator.hasNext()) {
			ContentProvider provider = iterator.next();
			if(provider.getId().equals(id)) {
				iterator.remove();
				return true;
			}
		}
		return false;
	}



	public List<ContentProviderDetail> getAllContentProviderDetail() {
		return CdnMockHelper.contentProviderDetailList;
	}

'''
// content = Pattern.compile('(?m)^.+?(?!public).+?$').matcher(thestr).replaceAll('');
//content = Pattern.compile('(?m)^.+?pu(?!blic).+?$').matcher(thestr).replaceAll('');
//content = Pattern.compile('(?m)^.+?pu(?!blic).+?$').
// println content
